﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using Google.GData.Client;

namespace DataSources
{
    public struct EntryInfo
    {
        public AtomId id;
        public string title;

        public EntryInfo(AtomId id, string title)
        {
            this.id = id;
            this.title = title;
        }
    }

    public interface IDataSource
    {
        bool IsAuthOK();
        string GetOwnerHash();
        void ReloadData();
    }

    namespace Watcher
    {
        public interface IDataWatcher : IDataSource
        {
            void ResetLastUpdated();
            void RefreshLastUpdated(string entryHash, string newCacheValue);
            IDataWatcher GetChildDataSource(string entryHash);
            Hashtable GetUpdatedEntries();
        }
    }

    namespace Holder
    {
        public interface IDataHolder : IDataSource
        {
            event EventHandler EntryChanged;

            IDataHolder GetChildDataSource(string entryHash);
            System.Drawing.Size GetSize();
            Hashtable GetEntries();

            void Submit(string entryHash, object inputData);
            void Request(string entryHash);
        }
    }
}
